package com.example.enums;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: ZhangLiang
 * @Date: 2021/06/07/14:45
 * @Description: 2.自定义枚举方法
 */
public class Pizza {

    private PizzaStatus status;
    public enum PizzaStatus{
        ORDERED,
        READY,
        DELIVERED
    }

    public boolean isDeliverable(){
        return getStatus()== PizzaStatus.READY;
    }

    public PizzaStatus getStatus() {
        return status;
    }

    public void setStatus(PizzaStatus status) {
        this.status = status;
    }
}
